package com.zhaorui.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName activity_sys_log
 */
@TableName(value ="activity_sys_log")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ActivitySysLog implements Serializable {
    /**
     * 主键
     */
    @TableId
    private Integer id;

    /**
     * 用户账户
     */
    private Integer userno;

    /**
     * 操作内容
     */
    private String content;

    /**
     * 用户ip
     */
    private String ip;

    /**
     * 操作时间：自动填充
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createtime;

    /**
     * 备用1
     */
    private String rem1;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ActivitySysLog other = (ActivitySysLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserno() == null ? other.getUserno() == null : this.getUserno().equals(other.getUserno()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getRem1() == null ? other.getRem1() == null : this.getRem1().equals(other.getRem1()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserno() == null) ? 0 : getUserno().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getRem1() == null) ? 0 : getRem1().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userno=").append(userno);
        sb.append(", content=").append(content);
        sb.append(", ip=").append(ip);
        sb.append(", createtime=").append(createtime);
        sb.append(", rem1=").append(rem1);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}